home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
ab20
/
ab20_archive
/
utilities
/
arexx
/
rexxarplib-2.52.lzh
/
rexx
/
alter.rexx
next >
Wrap
OS/2 REXX Batch file
|
1989-02-03
|
751b
|
41 lines
/** alter.rexx
*
* This function edits all the files containing one or more occurrences
* of a search string and sets the editor in searc/replace mode using a
* replacement string.
*
**/
parse arg fn ss rs .
options prompt "Next? "
if rs = "" then do
say "Usage: alter <wildcards> <search string> <replace string>"
exit
end
if ~show('l','rexxarplib.library') then addrexxlib
'search 'fn' 'ss' quiet | execio stem files.'
do i = 1 to files.0
if files.i = "" then leave
if i ~= 1 then do
parse pull yesno
if left(yesno, 1) = 'n' then do
say "Aborted"
exit
end
end
call setenv('Search', ss)
call setenv('Replace', rs)
'e 'files.i' startup alter.txed sticky'
end
say "Done"
exit